Game Music Overview

Game music files contain music data and optional text information about the game and music tracks. The music data is stored in two basic formats: a ripped format containing the original music player program, and a simpler logged format containing the commands sent to the sound chip.

The ripped format contains the actual machine code and related data used to play the music in the original game, manually extracted from the game's ROM and patched to work in isolation. To play this format, the game console's sound chip, CPU, memory mapper, and miscellaneous hardware must be emulated. A player can't easily determine in advance how long to play a track, since most loop endlessly or must be played through to find when they end in silence, so it's useful for the file format to include the length of the track. Because most games use the same player program for each track, most ripped music files contain a game's entire soundtrack.

The logged format contains a simple log of all sound chip commands, including when they occurred. Logs are created by running the game in an emulator, getting to a point where the song begins, then intercepting the commands sent to the sound chip. The length of a logged track is simply the time where the log ends, and most include loop points. Logged files always have only a single track from a game.

Ripped files are usually smaller because the playback code is from the original game, where space is limited. Logged music can be large due to having lots of redundant information, but has the advantage of being much simpler to play back. Compressing game music files reduces this size difference because logged music compresses more.

Some ripped files are created directly by musicians rather than extracted from games. These are made using a music sequencing tool that generates song data and adds a player program to it, resulting in a playable game music file. These usually have only one track per file.

What follows is a description of each supported game system format and its characteristics. Some support unique information fields, like who extracted the music from the game, what emulator was used, etc., but these aren't covered here or used by Game Music Box.

Super Nintendo

SPC: ripped; supports game, author, copyright, track name, and track time information.

Playback involves emulating the SPC-700 digital signal processor, CPU, and timers.

Nintendo Entertainment System

NSFE: ripped; supports game, author, copyright, track names, and track time information.

NSF: ripped; supports game, author, and copyright information (no track names or times).

Playback involves emulating the NES sound chip, CPU, and memory mapper. These formats support the expansion sound chips contained in some game cartridges. Game Music Box supports music using Namco 106, Konami VRC6, and Sunsoft FME-7 sound chips.

Nintendo Game Boy

GBS: emulated; supports game, author and copyright information (no track names or times).

Playback involves emulating the Game Boy sound chip, CPU, memory mapper, and timers.

Sega Master System

VGM: logged; supports game, author, copyright, track name, and track time information.

Playback involves emulating the SN76489 and YM2413 FM sound chips.

Sega Genesis/Mega Drive

VGM, GYM: logged; supports game, author, copyright, track name, and track time information.

Playback involves emulating the YM2612 FM sound chip, the SN76489 sound chip, and a PCM sound generator.

The GYM format has poor time resolution so PCM sample timing has to be mostly guessed by the player (VGM does not have this problem). Game Music Box is enhanced to reconstruct some lost data for PCM samples, but isn't always able to do this. Also, some GYM files use internal compression schemes that aren't well-documented. Game Music Box doesn't support any kind of internally "packed" GYM file, but does support those compressed normally with gzip.
